/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import model.Logstatus;

/**
 *
 * @author AQUA
 */
@Stateless
public class LogstatusFacade extends AbstractFacade<Logstatus> implements LogstatusFacadeRemote{
    @PersistenceContext(unitName = "ejb-servPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public LogstatusFacade() {
        super(Logstatus.class);
    }    

    @Override
    public void deleteByID(String id) {
        Logstatus logstatus = find(id);
        logstatus = em.merge(logstatus);
        em.remove(logstatus);
    }
    
    @Override
    public void insert(Logstatus logstatus) {
        em.persist(logstatus);
    }
    
    @Override
    public Logstatus merge(Logstatus logstatus) {
        return em.merge(logstatus);
    }
}
